<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use App\Models\User\Faces as Faces;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        $face =Faces::with(array('attach'=>function($query){
            $query->select('id','path');
        }))->select('attach_id','id')->take(6)->orderBy('id','desc')->get();
        view()->share('face',$face);
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
